Hello,
I have a two columns A and B in DOORS module. I need a function to be called whenever the text within the column A is changed, It should be appended with B column automatically. Can this be done using DXL?
Thanks in advance,
Muthurani M
muthurani - Mon Jan 04 08:45:11 EST 2010 |
Re: Automatic text change in Column llandale - Mon Jan 04 14:23:51 EST 2010
Lets forget about 'columns' for a minute and talk about 'attributes' only. I think you are asking for something that will insure that attribute A has as its suffix the value of attribute B if it doesn't already. So if B is '_B1' and someone changes A from 'AA' to 'AAA', the code changes it to 'AAA_B1'; and if the user changes A from 'AAA_B1' to 'AA_B1', then the code does nothing since it already ends in B.
To do that, you'd want a pre-save-attribute trigger defined for attribute A, that checks the the proposed attribute(trig) value, and if it doesn't end in the value of B then it sets the trigger to fail and manually sets the value of A using suffix B. In this case it wouldn't matter if B was displayed or not. Triggers are not for the feint of heart.
OK, now lets talk about Columns. If A is a layout column then the user cannot change the values; so A must be an attribute. But B can be a layout. The above trigger could, I suppose, be modified to look for column 'B' currently displayed and use that value as the suffix.
|